<template>
    <div>
        <from>
            <input v-module="a.name" type="text">
            <br>
            <input v-module="a.age" type="text">
            <br>
            <button @click.prevent="submit"></button>
        </from>
          
    </div>
</template>

<script setup lang='ts'>
import { ref, reactive } from 'vue'
// ref reactive
// ref 支持所有类型 
// reactive 支支持引用类型

//ref 取值和赋值都需要加.value
// reactive不需要加.value 
type M = {
    name: string,
    age: number
}
let a = reactive<M>({
    name: "poro",
    age: 23
})
a.age=18
const submit=()=>{
    console.log(a)
}

</script>
<style scoped></style>